public class Application{
public static void main(String args[]){
Pillar2 pillar2;
Geometry bottom =null;
pillar2 =new Pillar2 (bottom,100);
System.out.println("体积"+pillar2.getVolume());
bottom=new Rectangle(12,22);
pillar2 =new Pillar2 (bottom,58);
System.out.println("体积"+pillar2.getVolume());
bottom=new Circle2(10);
pillar2 =new Pillar2 (bottom,58);
System.out.println("体积"+pillar2.getVolume());
}
}
